<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{sdCustAddrBean.id}"/>
		<f:event type="preRenderView" listener="#{sdCustAddrBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Sd Cust Addr"/>

	<ui:define name="header">
		Sd Cust Addr
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty sdCustAddrBean.id}">
				Edit existing Sd Cust Addr
			</c:when>
			<c:otherwise>
				Create a new Sd Cust Addr
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="sdCustAddrBeanSdCustAddrSdCust" value="Sd Cust:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sdCustBean.converter}" id="sdCustAddrBeanSdCustAddrSdCust" value="#{sdCustAddrBean.sdCustAddr.sdCust}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sdCustBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sdCustAddrBeanSdCustAddrSdCust" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrSysAddrType" value="Sys Addr Type:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sysAddrTypeBean.converter}" id="sdCustAddrBeanSdCustAddrSysAddrType" value="#{sdCustAddrBean.sdCustAddr.sysAddrType}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysAddrTypeBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sdCustAddrBeanSdCustAddrSysAddrType" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrSysAddr01" value="Sys Addr 01:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sysAddr01Bean.converter}" id="sdCustAddrBeanSdCustAddrSysAddr01" value="#{sdCustAddrBean.sdCustAddr.sysAddr01}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysAddr01Bean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sdCustAddrBeanSdCustAddrSysAddr01" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrNo" value="Cust Addr No:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrNo" maxLength="20" value="#{sdCustAddrBean.sdCustAddr.custAddrNo}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrMoo" value="Cust Addr Moo:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrMoo" maxLength="10" value="#{sdCustAddrBean.sdCustAddr.custAddrMoo}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrMoo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrSoi" value="Cust Addr Soi:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrSoi" maxLength="100" value="#{sdCustAddrBean.sdCustAddr.custAddrSoi}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrSoi" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrRoad" value="Cust Addr Road:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrRoad" maxLength="100" value="#{sdCustAddrBean.sdCustAddr.custAddrRoad}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrRoad" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrBuilding" value="Cust Addr Building:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrBuilding" maxLength="100" value="#{sdCustAddrBean.sdCustAddr.custAddrBuilding}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrBuilding" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrFloor" value="Cust Addr Floor:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrFloor" maxLength="50" value="#{sdCustAddrBean.sdCustAddr.custAddrFloor}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrFloor" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrRoom" value="Cust Addr Room:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrRoom" maxLength="50" value="#{sdCustAddrBean.sdCustAddr.custAddrRoom}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrRoom" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrName01" value="Cust Addr Name 01:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrName01" maxLength="100" value="#{sdCustAddrBean.sdCustAddr.custAddrName01}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrName01" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrPostcode" value="Cust Addr Postcode:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrPostcode" maxLength="20" value="#{sdCustAddrBean.sdCustAddr.custAddrPostcode}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrPostcode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrPhoneNo" value="Cust Addr Phone No:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrPhoneNo" maxLength="20" value="#{sdCustAddrBean.sdCustAddr.custAddrPhoneNo}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrPhoneNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrFaxNo" value="Cust Addr Fax No:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrFaxNo" maxLength="20" value="#{sdCustAddrBean.sdCustAddr.custAddrFaxNo}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrFaxNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sdCustAddrBeanSdCustAddrCustAddrMobileNo" value="Cust Addr Mobile No:"/>
				<h:panelGroup>
					<h:inputText id="sdCustAddrBeanSdCustAddrCustAddrMobileNo" maxLength="20" value="#{sdCustAddrBean.sdCustAddr.custAddrMobileNo}"/>
					<h:message for="sdCustAddrBeanSdCustAddrCustAddrMobileNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{sdCustAddrBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty sdCustAddrBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{sdCustAddrBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{sdCustAddrBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>